package com.kongyz.demo2;

import com.kongyz.demo2.component.Hero;
import com.kongyz.demo2.component.ZhangLiang;
import com.kongyz.demo2.decorator.Skills_1;
import com.kongyz.demo2.decorator.Skills_2;
import com.kongyz.demo2.decorator.Skills_3;

/**
 * @author kongyz
 * @date 2018/6/28 22:59
 * @Description:
 */
public class Demo2 {
    public static void main(String[] args) {
        Hero hero=new ZhangLiang("张良");

        Hero zhangliang1=new Skills_1(hero,"1技能");
        zhangliang1.learnSkills();

        zhangliang1=new Skills_2(hero,"2技能");
        zhangliang1.learnSkills();

        zhangliang1=new Skills_3(hero,"3技能");
        zhangliang1.learnSkills();
    }
}
